﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using ExampleMvcApplication.Models;

namespace ExampleMvcApplication.Controllers
{
    public class TestValidationController : Controller
    {
        //
        // GET: /TestValidation/

        public ActionResult Index()
        {
            return View();
        }

        [HttpPost]
        public ActionResult Index(Customer customer) {
            if(ModelState.IsValid) {
                return View(customer);
            }
            return View(customer);
        }

    }
}
